local UIManager = {}

--require menu

--manage menu
UIManager.__index = UIManager

function UIManager:new()
	-- body
	local object = {}
	setmetatable(object, UIManager)

	return object
end

function UIManager:registerRoot(gameObject)
	self.root = gameObject
end

function UIManager:unRegisterRoot()
	self.root = nil
end

function UIManager:add(uiName, uiMenu)
	-- body
	local t1 = type(uiName)
	local t2 = type(uiMenu)
	if (t1 == "string" and t2 == "table")
	then
		self[uiName] = uiMenu
	end
end

function UIManager:remove(uiName, uiMenu)
	-- body
	local t1 = type(uiName)
	if (t1 == "string" and self[uiName] ~= nil)
	then
		self[uiName] = nil
	end
end

return UIManager